Fix a race that crash domU by calling xenbus_probe twice if it receive event
authorvhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com>
Sat, 18 Mar 2006 13:56:34 +0000 (13:56 +0000)
committervhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com>
Sat, 18 Mar 2006 13:56:34 +0000 (13:56 +0000)
between xs_init and setting xenbus_running

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index 017f36ccddb10429671d5dd937db45cd5d015686..a8f3a6c82f80dd39755905b962072fea3b11b704 100644 (file)
@@ -1049,6 +1049,8 @@ static int __init xenbus_probe_init(void)
                if (xsd_port_intf)
                        xsd_port_intf->read_proc = xsd_port_read;
        }
+       else
+               xenstored_ready = 1;
 
        /* Initialize the interface to xenstore. */
        err = xs_init();
@@ -1058,10 +1060,8 @@ static int __init xenbus_probe_init(void)
                return err;
        }
 
-       if (!dom0) {
-               xenstored_ready = 1;
+       if (!dom0)
                xenbus_probe(NULL);
-       }
 
        return 0;
 }